package com.spvs.system.common;

import lombok.Getter;

import java.util.Arrays;

@Getter
public enum PartLogEnum {
    RU_KU(0, "入库"),

    CHU_KU(1, "出库");


    PartLogEnum(Integer code, String desc){
        this.code = code;
        this.desc = desc;
    }
    private Integer code;
    private String desc;


    public static PartLogEnum getByFormCode(Integer code){
        return Arrays.stream(PartLogEnum.values())
                .filter(value -> value.getCode().equals(code))
                .findFirst().orElse(null);
    }
}
